<tpl> include file='sys_config.head.html' </tpl>
<div id="doc3">
	<div id="yui-main">
		<div class="yui-g">
 			<div id="divinbox">
				<div class="gtlbar">
					<div class="gtlbar-left"><tpl> $langSysMemManage </tpl> &gt;&gt; <tpl> $langSysMemModi </tpl></div>
				</div>
				<div class="ctge">
					<div class="ctge-1">
						<form action="member.manage.php" method="post" id="form_modi">
						<input type="hidden" name="action" value="modifysave" />
						<input type="hidden" name="member_id" value="<tpl> $member_array.member_id </tpl>" />
						<div class="ctge-1-1">
							<table cellSpacing="0" cellPadding="0" class="fct" border="0">
								<tr>
									<th><tpl> $langSysMemberName </tpl>:</th>
									<td><tpl> $member_array.login_name </tpl></td>
								</tr>
								<tr>
									<th><tpl> $langSysMPassword </tpl>:</th>
									<td>
									<span class="dptn"><tpl> $langSysMPasswordRemark </tpl></span>
									<input class="fct-input" name="txtPassword" id="txtPassword" type="text" maxlength="80" /></td>
								</tr>
								<tr>
									<th><tpl> $langSysMemtruename </tpl>:</th>
									<td>
									<input class="fct-input" name="txtTruename" id="txtTruename" type="text" maxlength="10" value="<tpl> $member_array.true_name </tpl>" /></td>
								</tr>
								<tr>
									<th><tpl> $langSysMbirthday </tpl>:</th>
									<td>
									<input class="fct-input" name="txtBirthday" id="txtBirthday" type="text" readonly="true" value="<tpl> $member_array.birthday </tpl>"/></td>
								</tr>
								<tr>
									<th><tpl> $langSysMememail </tpl>:</th>
									<td>
										<input class="fct-input" type="text" name="txtemail" id="txtemail" value="<tpl> $member_array.email </tpl>" maxlength="100" />
									</td>
								</tr>
								<tr>
									<th><tpl> $langSysMgender </tpl>:</th>
									<td><tpl> $gender </tpl></td>
								</tr>
								<tr>
									<th><tpl> $langSysMmobilephone </tpl>:</th>
									<td>
										<input class="fct-input" name="txtMobilephone" id="txtMobilephone" type="text" maxlength="15" value="<tpl> $member_array.mobilephone </tpl>"/>
									</td>
								</tr>
								<tr>
									<th><tpl> $langSysMphone </tpl>:</th>
									<td>
										<input class="fct-input" name="txtPhone" id="txtPhone" type="text" maxlength="15" value="<tpl> $member_array.phone </tpl>"/>
									</td>
								</tr>
								<tr>
									<th><tpl> $langSysMotherphone </tpl>:</th>
									<td>
										<input class="fct-input" name="txtOtherphone" id="txtOtherphone" type="text" maxlength="15" value="<tpl> $member_array.otherphone </tpl>"/>
									</td>
								</tr>
								<tr>
									<th><tpl> $langSysMzip </tpl>:</th>
									<td>
										<input class="fct-input" name="txtZip" id="txtZip" type="text" maxlength="15" value="<tpl> $member_array.zip </tpl>"/>
									</td>
								</tr>
								<tr>
									<th><tpl> $langSysMaddress </tpl>:</th>
									<td>
										<input type="hidden" name="area_id" id="area_id" value="<tpl> $member_array.area_id </tpl>" />
										<select id="c1" class="sele-2" name="c1">
											<option valus="" selected></option>
											<tpl> foreach item = parent from = $area_array </tpl>
											<option <tpl> if $sel_area[0].area_id eq $parent.area_id </tpl>selected="selected"<tpl> /if  </tpl> value="<tpl>$parent.area_id</tpl>||<tpl>$parent.is_parent</tpl>"><tpl> $parent.area_name </tpl></option>
										<tpl> /foreach </tpl>
										</select>
										<select class="sele-2" id="c2" name="c2">
											<option valus="<tpl> $sel_area[1].area_id </tpl>" selected><tpl> $sel_area[1].area_name </tpl></option>
										</select>
										<select class="sele-2" id="c3" name="c3">
											<option valus="<tpl> $sel_area[2].area_id </tpl>" selected><tpl> $sel_area[2].area_name </tpl></option>
										</select>
										<select class="sele-2" id="c4" name="c4">
											<option valus="<tpl> $sel_area[3].area_id </tpl>" selected><tpl> $sel_area[3].area_name </tpl></option>
										</select>
									</td>
								</tr>
								<tr>
									<th><tpl> $langSysMemDetailAddress </tpl>:</th>
									<td>
										<input class="fct-input" name="txtAddress" id="txtAddress" type="text" maxlength="60" value="<tpl> $member_array.address </tpl>"/>
									</td>
								</tr>
							</table>
						</div>
						<div class="bth-ct">
						<div class="bth-pl">
							<input class="bthl" value="<tpl> $langSysMemSubmit </tpl>" type="submit" />
							<input type="button" class="bthl" value="<tpl> $langSysMemReturnList </tpl>" onclick='history.back();'/>
						</div>
					</div>
					</form>
					</div>
				</div>	
			</div>
		</div>
	</div>
</div>
<tpl> include file='sys_config.js.html' </tpl>
<script>
$(document).ready(function(){
	tonext('#c1');

	$("#form_modi").validate({
		errorClass: "wrong",
		rules: {
			txtemail: {required:true,email:true},
			txtPassword: {minlength:6,maxlength:16}
		},
		messages: {
			txtemail: {required:"<tpl> $langSysMemberMailNotNull </tpl>",email:"<tpl> $langSysMemberMailFormatErr </tpl>"},
			txtPassword: {minlength:"<tpl> $alertSysMEnterPassword </tpl>",maxlength:"<tpl> $alertSysMEnterPassword </tpl>"}
		}
	});
});
function tonext(whos) {
	$(whos).change(
		function(){
			var valarray=$(this).val().split('||');	
			$('#area_id').val(valarray[0]);
			if (valarray[1]=='1') {
				$(this).next().attr('disabled','true').html('<option value="" selected="selected"><tpl> $langCDataToLoading </tpl></option>');
				$.get(
					'../home/tohtml.php',
					{action:'get_area',id:valarray[0],random_number:Math.random()},
					function(data){
						DataArray = data.split("|||");
						var a='';
						for (var i = 0; i<DataArray.length-1; i++) {
							att=DataArray[i].split("||");
							id=att[0];
							cla=att[2];
							a+='<option value="'+id+'||'+cla+'">'+att[1]+((cla=='1')?' ->':'')+'</option>';
						}
						
					$(whos).next().removeAttr('disabled').html('<option value="" selected="selected"></option>'+a).nextAll().html('');
					tonext($(whos).next());
					}
				)
			} else {
				$(whos).nextAll().html('').attr('disabled','true');
			};
		}
	)
};
</script>
</body>
</html>
